Address assignment method for at least one bus device that has recently been connected to a bus system

ABSTRACT

A bus device that has recently been connected to a bus system is first addressable at a pre-set address. A bus master transmits a new address and an identification to the bus device. The bus device compares the transmitted identification with an identification that has been stored in the bus device and assumes the transmitted new address, if the transmitted identification corresponds with the identification that has been stored in the bus device. The bus device is then addressable at the new address.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is based on and hereby claims priority to GermanApplication No. 100 40 438.3 filed on Aug. 18, 2000, the contents ofwhich are hereby incorporated by reference.

BACKGROUND OF THE INVENTION

The present invention relates to an address assignment method for atleast one bus device that has been newly connected to a bus system,which is first addressable at a pre-set address, whereby a bus mastertransmits a new address to the bus device, the bus device assumes thetransmitted new address, and the bus device is then addressable at thenew address.

Address assignment methods for precisely one newly connected bus deviceare known, for example, in the PROFIBUS under the name “node baptism”.Here, the address is assigned by the Service Access Point (SAP) 55 viaan acknowledged SRD service.

In the state-of-the-art method, each bus device newly connected to thebus system which is addressable at the pre-set address (by definitionaddress 126) is addressed. Only one bus device that is addressable atthis address may therefore be available at one time, since, in thestate-of-the-art method, each addressed bus device newly connected tothe bus system assumes the transmitted address, regardless of whetherthe transmitted address is or is not still being assumed by a furtherbus device.

SUMMARY OF THE INVENTION

An object of the present invention is to produce an address assignmentmethod in which correct address assignment, appropriate to the projectconcerned, is always possible, even if a plurality of bus devices havebeen newly simultaneously connected to the bus system.

This object is achieved when an identification is transmitted to the busdevice in addition to the new address, the bus device compares thetransmitted identification with an identification stored in the busdevice and assumes the transmitted new address only if the transmittedidentification corresponds to the identification stored in the busdevice.

Only the bus device whose identification has been transmitted thenassumes the transmitted new address, regardless of the number of busdevices newly connected to the bus system.

The transmission of the identification and the new address is notacknowledged by the bus device newly connected to the bus system, sinceno interference can then occur on the bus system, even in the case of aplurality of bus devices simultaneously or virtually simultaneouslyconnected to the bus system.

If the bus master, immediately before transferring the identificationand the new address, checks whether a different bus device is alreadyaddressable at the new address, accidental multiple address assignmentcannot occur.

If the new address which is to be assigned has already been assigned,the “node baptism” can then either be omitted or carried out with adifferent address. An error message can also be output.

If the bus master, immediately after transferring the identification andthe new address, checks whether the bus device newly connected to thebus system is addressable at the new address, and, if the bus devicenewly connected to the bus system is not addressable, retransmits theidentification and the new address, the address assignment is repeateduntil the bus device newly connected to the bus system has assumed itsnew address. It is thus ensured that the address assignment is actuallycarried out. The methods for checking the address assignment are knownper se.

If the bus master detects that a bus device is no longer addressable, itresumes the address assignment method.

If the new address is retentively stored by the bus device, the newlyassigned address is retained even in the event of a power failure. Itdoes not have to be re-assigned. The new address can be stored, forexample, in a buffered RAM or in an EEPROM.

A typical application of the address assignment method according to theinvention can be found in a field bus, e.g. the PROFIBUS.

BRIEF DESCRIPTION OF THE DRAWINGS

These and other objects and advantages of the present invention willbecome more apparent and more readily appreciated from the followingdescription of the preferred embodiments, taken in conjunction with theaccompanying drawings of which:

FIG. 1 is a block diagram of a bus system,

FIG. 2 is a block diagram of a bus master,

FIG. 3 is a block diagram of a bus device,

FIG. 4 is a flow chart for the bus master, and

FIG. 5 is a flow chart for the bus device.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

Reference will now be made in detail to the preferred embodiments of thepresent invention, examples of which are illustrated in the accompanyingdrawings, wherein like reference numerals refer to like elementsthroughout.

According to FIG. 1, a bus system has a bus master 1 and a plurality,according to FIG. 1 e.g. three, of passive bus devices 2 connected tothe bus system. The bus system is designed as a serial bus system of thetype generally used in field buses, e.g. the PROFIBUS. A technicalinstallation 3 is controlled and monitored by the bus system. Forcommunication between the bus master 1 and the bus devices 2, the busmaster issues addresses and, if necessary, a command and/or data to thebus devices 2. Using the assigned address, these bus devices checkwhether they are addressed. They respond only if they are addressed.

According to FIG. 2, the bus master 1 has a microprocessor 4. Themicroprocessor 4 processes a computer program product which is storede.g. in an EEPROM 5. Data administered by the microprocessor 4 arestored in a data memory 6 and the addresses of the individual busdevices 2 are stored in a further EEPROM 7.

According to FIG. 3, the bus devices 2 have a microprocessor 8. Thelatter similarly runs a computer program product which is stored in anEEPROM 9. In a data memory 10, the bus device 2 buffers data between thebus master 1 and the technical installation 3. An identification k′ andan address adr′ are further stored in the EEPROM 9.

The identification k′ must be unique, at least within the bus system. Itis preferably already stored by the manufacturer of the bus device 2 inthe EEPROM 9. Here, it can be ensured by suitable measures that thisidentification k′ is only assigned once worldwide.

The address adr′ is first set to a previously known value, in thePROFIBUS e.g. to the value 126. The bus device 2 can be addressed atthis address adr′ until the address adr′ is changed by the bus master 1to a different value, e.g. between 1 and 125.

The above statements on the bus devices 2 also apply to further busdevices 2′ which are to be newly connected to the bus system. The onlydifference between the bus devices 2 and the bus devices 2′ is that theformer are already operated on the bus at addresses adr′ between 1 and125, whereas the newly connected bus devices 2′ still have their initialaddress 126.

In order to enable correct operation of the bus devices 2′ newlyconnected to the bus system, the initial address 126 must first bechanged. The procedure for doing this is as follows:

According to FIG. 4, the bus master 1 first requests 11, an address xwhich is to be newly assigned within the bus system. If the bus master 1detects 12 a response with this address x, it quits 13 the addressassignment program. The bus master 1 therefore first checks whether abus device 2 is already addressable at the address x which is to benewly assigned.

If the bus master 1 detects no response, it transmits an identificationk and the address x which is to be newly assigned at the address 126.Immediately thereafter, it again checks whether a bus device 2, 2′responds at the address x. If the bus master 1 detects 16 a response,the bus device 2′ newly connected to the bus system has assumed theaddress x, i.e. it is now addressable at this address x. In this case,the address assignment is ended 17. Otherwise, the bus master 1 repeatsthe operations 14 to 16.

The identification k can be defined for the bus master 1—see FIG. 2—forexample via a keyboard 18 or any other input device. In addition, itshould further be mentioned that the repetition of operations 14 to 16can be restricted to a predefined number, e.g. three or four passes.

Before assuming the address x which is to be assigned, the bus device 2′has its address adr′ initially set 19 to the value 126. The bus device2′ then receives 20 an address adr via the bus system, at which the busmaster 1 addresses the bus devices 2, 2′. The bus device 2′ checks 21whether the received address adr corresponds to its own address adr′. Ifnot, the bus device 2′ concerned is not addressed and therefore ends 22the further reception of information.

If the addresses adr, adr′ correspond, the bus device 2′ checks 23whether its address adr′ is still set to the value 126. If not, a newaddress has already been assigned to this bus device 2′. In this case,it processes 24 a different response. Otherwise, the bus device 2′receives 25 the transmitted identification k and the address x which isto be assigned.

The bus device 2′ then checks 26 whether the transmitted identificationk corresponds to the identification k′ stored in it. If not, it is notaddressed and ends 27 the address change routine. Otherwise, it assumes28 the transmitted address x as its new address adr′. The transmittedaddress x is stored by the bus device 2′ in the EEPROM 9, i.e.retentively. In the event of further calling, this bus device 2′ is thenno longer addressable at the address 126, but at the address x.

The address k may also be stored non-retentively by the bus device 2′.In this case, the predefined address, e.g. 126, can always be assumedinitially, e.g. on start-up.

In principle, a separate message can be used for each identificationaddress pair. However, a plurality of pairs can also be combined ifnecessary into one message. In the case of a large number of bus devices2′ newly connected to the bus system, a plurality of messages can alsobe transmitted, in each case with a plurality of pairs.

The decisive advantage of the present invention is that the bus device2′ does not acknowledge the transmission of the identification k and thenew address x. As a result, a plurality of bus devices 2′ can be newlyconnected to the bus system in one pass.

The invention has been described in detail with particular reference topreferred embodiments thereof and examples, but it will be understoodthat variations and modifications can be effected within the spirit andscope of the invention.

1. An address assignment method for at least one bus device that has been newly connected to a bus system, comprising: transmitting a new address and an identification from a bus master to a bus device initially addressable at a pre-set address; comparing, at the bus device, the identification transmitted from the bus master with a preset identification stored in the bus device; and assuming, at the bus device, the new address transmitted from the bus master, if the identification transmitted from the bus master corresponds to the preset identification stored in the bus device, so that the bus device is subsequently addressable at the new address.
 2. An address assignment method as claimed in claim 1, wherein said method does not comprise acknowledging, by the bus device, transmission of the identification and the new address.
 3. An address assignment method as claimed in claim 1, further comprising checking by the bus master, before transmitting the identification and the new address, whether a different bus device is already addressable at the new address.
 4. An address assignment method as claimed in claim 1, further comprising: checking by the bus master, immediately after transmitting the identification and the new address, whether the bus device newly connected to the bus system is addressable at the new address, and retransmitting the identification and the new address by the bus master, if the bus device newly connected to the bus system is not addressable.
 5. An address assignment method as claimed in claim 1, further comprising retentively storing the new address by the bus device.
 6. An address assignment method as claimed in claim 1, wherein the bus system uses a field bus.
 7. An address assignment method as claimed in claim 1, wherein the bus system uses a PROFIBUS.
 8. At least one computer readable medium storing a program to control a bus master to perform a method comprising: transmitting a new address and an identification from a bus master to a bus device initially addressable at a pre-set address; comparing, at the bus device, the identification transmitted from the bus master with a preset identification stored in the bus device; and assuming, at the bus device, the new address transmitted from the bus master, if the identification transmitted from the bus master corresponds to the preset identification stored in the bus device, so that the bus device is subsequently addressable at the new address.
 9. At least one computer readable medium as claimed in claim 8, wherein said method does not comprise acknowledging, by the bus device, transmission of the identification and the new address.
 10. At least one computer readable medium as claimed in claim 8, said method further comprising checking by the bus master, before transmitting the identification and the new address, whether a different bus device is already addressable at the new address.
 11. At least one computer readable medium as claimed in claim 8, further comprising: checking by the bus master, immediately after transmitting the identification and the new address, whether the bus device newly connected to the bus system is addressable at the new address, and retransmitting the identification and the new address by the bus master, if the bus device newly connected to the bus system is not addressable.
 12. At least one computer readable medium as claimed in claim 8, further comprising retentively storing the new address by the bus device.
 13. At least one computer readable medium as claimed in claim 8, wherein the bus system uses a field bus.
 14. A bus master connected via a bus system to at least one bus device that has been newly connected to the bus system, comprising: an output unit to transmit a new address and an identification to a bus device initially addressable at a pre-set address, the bus device comparing the identification transmitted from said bus master with a preset identification stored in the bus device and assuming the new address transmitted from said bus master, if the identification transmitted from said bus master corresponds to the preset identification stored in the bus device, so that the bus device is subsequently addressable at the new address.
 15. A bus master as claimed in claim 14, further comprising a checking unit to check whether a different bus device is already addressable at the new address before transmitting the identification and the new address.
 16. A bus master as claimed in claim 15, wherein the checking unit also checks whether the bus device newly connected to the bus system is addressable at the new address, immediately after transmitting the identification and the new address, and wherein the output unit retransmits the identification and the new address, if the bus device newly connected to the bus system is not addressable.
 17. A bus master as claimed in claim 14, wherein the bus device uses a field bus.
 18. A bus device newly connected via a bus system to a bus master, comprising: an input unit to receive a new address and an identification from a bus master to a bus device initially addressable at a pre-set address; at least one storage unit to store a preset identification; and a processing unit to compare the identification transmitted from the bus master with the preset identification and to assume the new address transmitted from the bus master, if the identification transmitted from the bus master corresponds to the preset identification stored in said at least one storage unit, so that said bus device is subsequently addressable at the new address.
 19. A bus device as claimed in claim 18, wherein said bus device does not acknowledge receipt of the identification and the new address.
 20. A bus device as claimed in claim 18, wherein said at least one storage unit retentively stores the new address by the bus device.
 21. A bus device as claimed in claim 18, wherein the bus system uses a field bus. 